Checking types within an array