Php type checking