Cleaned up how lua::type works