Fixed issue of jquery returning null object