javascript check if object is null or empty or undefined