private function nonScalarTypeExists($type) { return class_exists($type) || interface_exists($type) || in_array($type, ["array", "object", "callable"]); }