safe_NLS_pred accepts NAs or NULLs