do not allow to add null objects to idr

Change-Id: I8f6694b4b17d540130281b8bfd08ee56128a76dc
Signed-off-by: Eyal Salomon <esalomon@mellanox.com>