Works with all datatypes except for arrays of primitives.