I'd add the line above this one into this check, so you don't hit the DB unnecessarily.