(optional) Not your fault but do we need the else nil ?. Isnt nil what will anyway get returned if the other 2 conditions didnt match ?