Should this check be at the top of the function?