resolve scrutinizer issue, is_a type hint doesn't allow null