add validation to mapper.put