@jameshalsall I think this could benefit from a separate function along the lines of `checkStatusIsValid($status)`