Use 'has' method to check element exists