Could you please tell me why it shows "RuntimeError: result type Long can't be cast to the desired output type Bool" when running this code?