only strip port property if not nil