Add getter firstIfAny, refactor.