Add None check for float to_python