Accounted for edge-case possible NullPointerException caught in testing.