var_dump(str_contains("foobar", null));
bool(null)
TypeError: str_contains(): Argument #2 ($needle) must be of type string, null given