fixes NullPointer for empty return