Makes map service check style compliant

Copy paste code I think and the code behaves differently compared to invalidateAllnearCaches(String mapName, Data key) because it handles exceptions differently.