use data.isNull() instead of !data.getBytes()