You can simplify a bit by dropping an indent-level here, since the return above makes the else redundant.