Add nil condition for getter