Imam Ibn Daqiq al Eid said:
“The statement of the Prophet, may God’s peace and blessings be upon him, “avoid new fallacies.” Be aware that novelties are divided into two. First: novelties that have no basis in sharia. Such novelties are null and void. Second: novelties that are based on other similar laws. Such novelties are not rejected. Novelties that contradict sunna and lead to misguidance are condemned. But not every novelty is a heresy. God, the Sublime, says, “Whenever novelties of the Qur’an from their Lord are revealed to them, they listen to them while playing.(Al-Anbiya :2)” ‘Umar, may God be pleased with him, said, “What a nice novelty this is! (Referring to the tarawih.)”
The Imam also said:
On the other hand, deriving branches from principles that do not go outside the boundary of sunna is not heresy. Examples of this include writing the Holy Qur’an in books, doctrines by good jurisprudents who base their interpretations on the sayings of God’s Messenger, may God’s peace and blessings be upon him, and books about grammar, arithmetic, commandments, and other scholarly fields that are based on the teachings and commands of God’s Messenger, may God’s peace and blessings be upon him. All those are outside the scope of this hadith.