only throw error if string is required and not present