Remove unnecessary if conditions

if obj it None, it's None, there's no need to check it