I'd put this check in the middle