added NaN checks to catch broken rayquery results, fixes #37