Remove redundant checks, use cheaper exists instead of count