Added search time measuring, fixed NullPointerException on empty search