test to prevent errors on null objects