Simplify the checkInstanceMove function