Lambda Function With If Else Condition Question