Fixed NullPointerExceptions in JavaScript-Code generated by GWT.