code: public static boolean isNumber( Object obj ) {
        if( (obj != null && obj.getClass() == Byte.TYPE)
              || (obj != null && obj.getClass() == Short.TYPE)
              || (obj != null && obj.getClass() == Integer.TYPE)
              || (obj != null && obj.getClass() == Long.TYPE)
              || (obj != null && obj.getClass() == Float.TYPE)
              || (obj != null && obj.getClass() == Double.TYPE) ){
           return true;
        }
  
        return obj instanceof Number;
     }
docs: Tests if obj is a primitive number or wrapper.<br>