Remove null values in capabilities