Prevents nan and infinity being parsed as numerical keys.