Prevent TypeError