Checking for rasterlayer type before running value count