Adding array type check and default to empty array