Fixed potential null reference exception in null value analysis