fixed undefined data error when creating the display

it was calling data.toString(); with an undefined value.
undefined is not a valid value for data, the actual error you want to solve happens earlier.