Fix rendering issues

* fix bug when variable is null object
* fix test when rendered variable is false