make type optional, defaulting to string if not set