Could probably do with a decorator here to prevent the error below.