Casting attribute values given as string

So far only specs are available. Wait for implementation, then merge ;-)
The actual type-casting code should be refactored, preferably into a separate (private) method.