Dynamically determine field type if not set by user
Fixed example, specs and field type checking