I moved this check further up the diff