More intricate empty value checking - it depends on the type now