Fixes several bugs leading to Exceptions

Several bugs exist that trigger Exceptions when working with the
table. First a NullPointerException gets triggered when the editing
of a cell gets canceled without a value in it. Second another
NullPointerException gets triggered when DELETE gets hit and no
row is being edited. And the third exception is a
IndexOutOfBoundsException that gets thrown whenever DELETE is hit
and no row is selected. These bugs get fixed with this commit.