How do you use if else statements in functions that return a value?

for a function that returns an optional, in the else statements you can return false