How can I simplify the null check in this jQuery function

visit shbcf.ru