Refactored null case test further.