Added a static_assert for more user friendly type errors