Added the check as requested.