Revert "removed useless tests for null arguments"

This reverts commit 5bc967fb14ba26fa8913e9e175fa90052aef422a.