In general, I would agree with the accepted answer, as you should normally ensure that you get paid for your time - regardless of what you do.
However, sometimes a mockup can be essential in landing a customer and could therefore be seen as an investment. Off course, the risk is that the customer takes your free work and goes elsewhere.
Perhaps one could produce 'partial' mockups which demonstrate your capabilities and proposed way forward, but don't reveal how you would go about the entire solution.
The only universal rule in freelancing is always staying focused on turning a lead into a paying customer. If it seems likely that no more work will be forthcoming, all work must be paid for. If more work seems likely, you're in the more difficult grey zone and must evaluate whether the potential client dangling lots of potential future work in front of you is being honest.
As long as a client owes you money - or when you have done agreed upon free work - always ensure that they don't hold all the cards. You must either insist on payment or only make partial deliveries.