Convert assertion to check is_null instead of empty

Signed-off-by: crynobone <crynobone@gmail.com>