check if from/to are null for perf enhancement
bugfix and comment cleanup
check if move === null to avoid errors