結果 : javascript check if object is null before calling method