Typecast attributes

make sure attributes are of the right type