Addressed in next commit - Made the conditional code inside the method and extra checks so that it returns undefined when selector not available.