properly handle None value