ModelContext: Added check for a Provider before attempting to check for/and release the context