Optimized search

Removed redundant check.