Remove comparisons of int to NULL.
Remove comparisons of int to NULL.

Fixes clang warnings introduced by the use of ReferencePtr.

opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core,opensim-org/opensim-core