As said, either do this in the constructor or check the return value of findByOne(), although I tend to do the former, if at all.