updated with refactored error message

the var dump does not give correct output.  It returns type not the
value