Amuse oneself idly with, trifle, as in He teased her, toying with her as a cat toys with a mouse. [Early 1500s]
Treat casually or without seriousness, as in I'm toying with the idea of writing a novel. [Early 1800s]
The American Heritage® Idioms Dictionary Copyright © 2002, 2001, 1995 by Houghton Mifflin Harcourt Publishing Company. Published by Houghton Mifflin Harcourt Publishing Company.