check if return type is array or record (Issue #18)