Mental illness and intellectual disability in Magistrates Courts in New South Wales, Australia.