You don't really need this check do you? You control how/when this function get's called. You only call it in one place and it passes a callback.