guarding against None values