Added error pattern for wrong type of value