Move guard into helper method