code: public static function typeOf($arg) {
  
          if (null === $arg) {
              return 'NULL';
          }
  
          if (is_object($arg)) {
              return get_class($arg);
          }
  
          return gettype($arg);
      }
docs: Get type of argument for exception messages.
  
  @param $arg
  @return string