How to check if an array is empty in JavaScript