Add a check if ValueType on returnResult before testing null