transferred empty check to repository