Strict type validator for PHP