Added check for arrays, unions, complex and vector types.
Cleaned up the check and fixed the comment about missing return type encoding.