Made NULL handling compatible with Nette
Microoptimalizations