Merge "Put NaN checks where it is otherwise not expected" into rvc-dev