protected function checkType($value, $types): ?string
    {
        $type = gettype($value);

        return in_array($type, $types) ? $type : null;
    }
protected function checkType($value, $types): ?string
    {
        $type = gettype($value);

        return in_array($type, $types) ? $type : null;
    }
protected function checkType ( $ value , $ types ) : ? string { $ type = gettype ( $ value ) ; return in_array ( $ type , $ types ) ? $ type : null ; }
Check if value is one of the specified types

@param mixed $value
@param array $types
@return string|null
Check if value is one of the specified types