added if to check if asteroids is empty before checking for closest asteroid