It sounds like you're passing an invalid value into the @lastname parameter when you call the procedure. Are you sure your procedure call has the two parameters in the proper order?
And why are you giving you parameter @lastname a value on your first line. You do not need this parameter then, its value will be lost and you did not used it!