Implements custom functions for type validations. (Travis php5.4 failling on is_int function)