The justice made his comments during a hearing on the Trump administration's restrictions around asylum seekers.