Check if data is defined in window.resize() handler