Improved and fixed some bugs when printing nil values and tables.