Fixed issue where comparison with None fails