Added null check on add