Perform check on provider to avoid possible null exception