code: public static boolean asBoolean(Object o)
    {
      if(o == null) {
        return false;
      }
      if(isBoolean(o)) {
        return (Boolean)o;
      }
      if(isNumber(o)) {
        return ((Number)o).byteValue() != 0;
      }
      if(o instanceof String) {
        return !((String)o).isEmpty();
      }
      if(isArray(o)) {
        return Array.getLength(o) > 0;
      }
      if(isCollection(o)) {
        return ((Collection<?>)o).size() > 0;
      }
      if(isMap(o)) {
        return ((Map<?, ?>)o).size() > 0;
      }
      if(isCharacter(o)) {
        return Character.isDefined((Character)o);
      }
      return true;
    }
docs: Returns a boolean representation of a given object instance. This predicate behavior resemble
  <code>JavaScript</code> cast of object to boolean value. Here are tested conditions:
  <ul>
  <li>if {@link #isBoolean(Object)} returns boolean value,
  <li>if {@link #isNumber(Object)} returns true if number is not zero,
  <li>if instance is string returns true if string is not empty,
  <li>if {@link #isArray(Object)}, {@link #isCollection(Object)} or {@link #isMap(Object)} returns true if is not
  empty,
  <li>if {@link #isCharacter(Object)} returns true if character is defined.
  </ul>
  <p>
  If object instance is null returns false.
  
  @param o object instance to interpret as boolean.
  @return boolean representation of object instance.