Empty array is now verified using isEmpty method rather than count