python return none if key not in dictionary