Remove unnecessary if/else in findParentByClass