libs/json: duplicate null check for retro-compatibility

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>