ReadOnly: Check the readonly flag instead of whether the tdb pointer is NULL or not