Ukrainian president mulls seeking legal advice from top court as his 5-year term expires on May 20