Updated to do a real type check on array args