Js Check If Variable Is Function