I'd change this to an `or` check. If either one is None, than skip the entry.