Added generic parameter to matcher helper

This allows the helper functions to be used in tests where the type isn't an
integer