Got rid of an unnecessary type assertion and elseif clause when checking structAsValueType.