This is a common problem. A user computes a value returning arbitrary computation results back hoping that the value will match the type of the attribute.
At the moment, any conversion error is logged in the log-files but not shown to the user. The log currently does not contain a reference to the element, so even when looking at the log, no one would be able to tell where that error originated.
As it is near impossible to know the type of an attribute without looking up source code or long forgotten documentation, having in-place documentation will help greatly with debugging problems in reports.