Added mechanism for the scalar data cast.