Hack for overcoming php 5.4- limitation in 'empty' function.