null checking for ownerId