Adding a method which facilitates exporting java methods

Added a fix for a NPE when running: $(window).is("input")