fixed a wrong assertion

currently, the asserts requires data to be nil. Im quite sure, this is wrong.