Handle null exception in /random