isinstance does not work with None