check if an array ref is defined