Skip nil values in response

Fixes my previous buggy PR, sorry