Why do you hide this simple check in it's own function?