[MAIN] Update grad() method to don't return None.