Might be clearer to return early, rather than set a variable and return it at the end of the function.